import axios from '@/utils/request'

import config from '@/common/config'

const base = config.getMkBasePath()

/**
 * points_user_seq
 *1    默认只开放普通查询，所有查询，只要上传	 分页参数 {currentPage:当前页码从1开始,pageSize:每页记录数,total:总记录【数如果是0后台会自动计算总记录数非0不会自动计算】}，后台都会自动按分页查询 其它 api用到再打开，没用到的api请注释掉，
 *2 查询、新增、修改的参数格式  params={id:'ID 主键',userid:'客户编号',username:'用户名',totalPoints:'余额表中总积分',enabledPoints:'余额表中可用积分',freezePoints:'余额表中冻结积分',acctStatus:'状态0生效1冻结',createTime:'创建时间',lastupdateTime:'最新更新时间',lasttermPoints:'上期总积分',checkValue:'检验码',signature:'关键数据签名验证',deptid:'机构编号',branchId:'云用户机构编号',companyId:'公司编号',companyName:'公司名称',changeTotalPoints:'本次变动总积分',changeEnabledPoints:'本次变动可用积分',changeFreezePoints:'本次变动冻结积分',remark:'变动原因',orderId:'订单ID',shopId:'商铺ID',locationId:'门店ID'}
 **/

// 普通查询 条件之间and关系
export const listPointsUserSeq = params => { return axios.get(`${base}/mk/points/pointsUserSeq/list`, { params: params }) }

// 模糊查询points_user_seq 条件之间or关系
// export const listPointsUserSeqKey = params => { return axios.get(`${base}/mk/points/pointsUserSeq/listKey`, { params: params }); };

// 删除一条points_user_seq params={id:'ID 主键'}
export const delPointsUserSeq = params => { return axios.post(`${base}/mk/points/pointsUserSeq/del`, params) }

// 批量删除points_user_seq  params=[{id:'ID 主键'}]
export const batchDelPointsUserSeq = params => { return axios.post(`${base}/mk/points/pointsUserSeq/batchDel`, params) }

// 修改一条points_user_seq记录
export const editPointsUserSeq = params => { return axios.post(`${base}/mk/points/pointsUserSeq/edit`, params) }

// 新增一条points_user_seq
export const addPointsUserSeq = params => { return axios.post(`${base}/mk/points/pointsUserSeq/add`, params) }
